﻿//下载程序
var columns =
            [
             { display: 'URL', name: 'URL', type: 'text', hide: 1 },
                {display: '文件名', name: 'FileName', mintWidth: 400, width: 400, render: function (item) {
                    return '<a href="' + item.URL + '" title="' + item.FileName + '" alt="' + item.FileName + '" target="_blank">' + item.FileName + '</a>';
                }
            },
                { display: '备份时间', name: 'CreateDate', mintWidth: 200, width: 200, type: "date", options: { format: "yyyy-MM-dd hh:mm:ss"} },
             ];

var manager;
//init controls
$(document).ready(function () {
    initligerGrid();
});


function initligerGrid() {
    manager = null;
    //$.get("../Db/GetDataOfJSON", function (data) {
        manager = $("#dbBackGrid").ligerGrid({
            columns: columns,
            title: '数据备份下载',
            showTitle: true,
            width: '100%',
            enabledSort: true,
            height: '99%',
            checkbox: false,
            rownumbers: true,
            toolbar: { items: [
                                    { text: '设置', click: modifyOperation, icon: 'modify' }
                                    ]
            },
            url: "../Db/GetDataOfJSON"
        });
   // });
}

//Update
function modifyOperation() {
    $.ligerDialog.open({ url: '../Db/Edit', height: getDialogHeight(), width: getDialogWidth(),
        isResize: true, isHidden: false
    });
}